<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('comment', function (Blueprint $table) {
            $table->increments('id')->comment('商品评论ID');
            $table->unsignedInteger('uid')->default(0)->comment('用户ID');
            $table->unsignedInteger('gid')->default(0)->comment('商品ID');
            $table->string('pf')->nullable()->comment('商品评分');
            $table->string('words')->nullable()->comment('商品评论');
            
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::drop('comment');
    }
}
